const IconFontMap = [{
    key: '比赛',
    name: 'changjing_bisai_icon',
    color: '#ef9c65'
  },
  {
    key: '灯带',
    name: 'changjing_dengdai_ic',
    color: '#599ff2'
  },
  {
    key: '打扫',
    name: 'changjing_dasao_icon',
    color: '#4d9bd6'
  },
  {
    key: '壁灯',
    name: 'changjing_bideng_ico',
    color: '#ef9c65'
  },
  {
    key: '窗帘',
    name: 'changjing_chuanglian',
    color: '#ef9c65'
  },
  {
    key: '灯光',
    name: 'changjing_dengguang_',
    color: '#ef9c65'
  },
  {
    key: '故事',
    name: 'changjing_gushi_icon',
    color: '#8749c3'
  },
  {
    key: '吊灯',
    name: 'changjing_diaodeng_i',
    color: '#4d9bd6'
  },
  {
    key: '会客',
    name: 'changjing_huike_icon',
    color: '#599ff2'
  },
  {
    key: '进入',
    name: 'changjing_jinru_icon',
    color: '#2bd396'
  },
  {
    key: '结束',
    name: 'changjing_jieshu_ico',
    color: '#4d9bd6'
  },
  {
    key: '卷帘',
    name: 'changjing_juanlian_i',
    color: '#597cbf'
  },
  {
    key: '浪漫',
    name: 'changjing_langman_ic',
    color: '#ed95ff'
  },
  {
    key: '离开',
    name: 'changjing_likai_icon',
    color: '#5ea4e3'
  },
  {
    key: '聊天',
    name: 'changjing_liaotian_i',
    color: '#2bc286'
  },
  {
    key: '聚会',
    name: 'changjing_juhui_icon',
    color: '#4d9bd6'
  },
  {
    key: '淋浴',
    name: 'changjing_linyu_icon',
    color: '#2ab9c6'
  },
  {
    key: '冥想',
    name: 'changjing_mingxiang_',
    color: '#ef9c65'
  },
  {
    key: '跑步',
    name: 'changjing_paobu_icon',
    color: '#597cbf'
  },
  {
    key: '派对',
    name: 'changjing_paidui_ico',
    color: '#8749c3'
  },
  {
    key: '泡澡',
    name: 'changjing_paozao_ico',
    color: '#2ab9c6'
  },
  {
    key: '品茶',
    name: 'changjing_pincha_ico',
    color: '#2bc286'
  },
  {
    key: '全关',
    name: 'changjing_quanguan_i',
    color: '#4f8bf3'
  },
  {
    key: '清洗',
    name: 'changjing_qingxi_ico',
    color: '#4d9bd6'
  },
  {
    key: '起床',
    name: 'changjing_qichuang_i',
    color: '#2bc286'
  },
  {
    key: '全开',
    name: 'changjing_quankai_ic',
    color: '#2bc286'
  },
  {
    key: '日常',
    name: 'changjing_richang_ic',
    color: '#2ab9c6'
  },
  {
    key: '睡眠',
    name: 'changjing_shuimian_i',
    color: '#8576cc'
  },
  {
    key: '射灯',
    name: 'changjing_shedeng_ic',
    color: '#597cbf'
  },
  {
    key: '舒适',
    name: 'changjing_shushi_ico',
    color: '#ff9b5f'
  },
  {
    key: '洗漱',
    name: 'changjing_xishu_icon',
    color: '#599ff2'
  },
  {
    key: '夜起',
    name: 'changjing_yeqi_icon',
    color: '#599ff2'
  },
  {
    key: '筒灯',
    name: 'changjing_tongdeng_i',
    color: '#599ff2'
  },
  {
    key: '休闲',
    name: 'changjing_xiuxian_ic',
    color: '#2ab9c6'
  },
  {
    key: '休息',
    name: 'changjing_xiuxi_icon',
    color: '#599ff2'
  },
  {
    key: '阅读',
    name: 'changjing_yuedu_icon',
    color: '#ef9c65'
  },
  {
    key: '游戏',
    name: 'changjing_youxi_icon',
    color: '#8749c3'
  },
  {
    key: '瑜伽',
    name: 'changjing_yujia_icon',
    color: '#8749c3'
  },
  {
    key: '运动',
    name: 'changjing_yundong_ic',
    color: '#597cbf'
  },
  {
    key: '娱乐',
    name: 'changjing_yule_icon',
    color: '#8749c3'
  },
  {
    key: '早餐',
    name: 'changjing_zaocan_ico',
    color: '#5ea4e3'
  },
  {
    key: '观影',
    name: 'changjing_guanying_i',
    color: '#ef9c65'
  },
  {
    key: '默认',
    name: 'changjing_juanlian_i',
    color: '#2ab9c6'
  },
]

export default function getIcon(str) {
  let flag = true
  for (let i = 0; i < IconFontMap.length; i++) {
    if (str.includes(IconFontMap[i].key)) {
      flag = false
      return IconFontMap[i]
    }
  }
  if(flag) return IconFontMap[IconFontMap.length - 1]
}
